//
//  NetWorkTools.h
//  NewsBoard
//
//  Created by apple on 16/1/30.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "AFHTTPSessionManager.h"

typedef void(^CompleteBlock)(id object);

@interface NetWorkTools : AFHTTPSessionManager


+ (instancetype)sharedNetWorkTools;

/**
 *  POST 请求数据单例方法
 *
 *  @param URLDict           传入字典参数
 *  @param MenthodNameString 传入接口请求名
 *  @param completeBlock     返回数据Block
 */
- (void)objectWithURLDict:(id )URLDict AndMenthodName:(NSString *)MenthodNameString completeBlock:(CompleteBlock)completeBlock;

- (void)OtherobjectWithURLDict:(NSDictionary *)URLDict AndMenthodName:(NSString *)MenthodNameString completeBlock:(CompleteBlock)completeBlock;
// 购物车
- (void)ShopCarobjectWithURLDict:(id )URLDict AndMenthodName:(NSString *)MenthodNameString completeBlock:(CompleteBlock)completeBlock;
/**
 *  字符串转数组
 */
+ (NSArray *)arrayWithJsonString:(NSString *)jsonString;

/**
 *  字符串转字典
 */
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

/**
 *  反序列化
 */
- (id)toArrayOrNSDictionary:(NSData *)jsonData;
- (void)OtherobjectWithURLDict:(NSDictionary *)URLDict AndMenthodName:(NSString *)MenthodNameString completeBlock:(CompleteBlock)completeBlock;
@end
